package com.itheima.method;

public class MethodDemo02 {
    public static void main(String[] args){
        //调用方法
        print(10,"HelloWorld");
        print(5,"HelloJava");

    }




    //定义方法
    public static void print(int count,String msg){  // int count = 10
        for(int i = 1;i<=count;i++){
            System.out.println(msg);
        }

    }
}
